package com.ruoyi.mes.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mes.mapper.FinishedGoodsMapper;
import com.ruoyi.mes.domain.FinishedGoods;
import com.ruoyi.mes.service.IFinishedGoodsService;

/**
 * 成品库存信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-09
 */
@Service
public class FinishedGoodsServiceImpl implements IFinishedGoodsService 
{
    @Autowired
    private FinishedGoodsMapper finishedGoodsMapper;

    /**
     * 查询成品库存信息
     * 
     * @param inventoryId 成品库存信息主键
     * @return 成品库存信息
     */
    @Override
    public FinishedGoods selectFinishedGoodsByInventoryId(Long inventoryId)
    {
        return finishedGoodsMapper.selectFinishedGoodsByInventoryId(inventoryId);
    }

    /**
     * 查询成品库存信息列表
     * 
     * @param finishedGoods 成品库存信息
     * @return 成品库存信息
     */
    @Override
    public List<FinishedGoods> selectFinishedGoodsList(FinishedGoods finishedGoods)
    {
        return finishedGoodsMapper.selectFinishedGoodsList(finishedGoods);
    }

    /**
     * 新增成品库存信息
     * 
     * @param finishedGoods 成品库存信息
     * @return 结果
     */
    @Override
    public int insertFinishedGoods(FinishedGoods finishedGoods)
    {
        return finishedGoodsMapper.insertFinishedGoods(finishedGoods);
    }

    /**
     * 修改成品库存信息
     * 
     * @param finishedGoods 成品库存信息
     * @return 结果
     */
    @Override
    public int updateFinishedGoods(FinishedGoods finishedGoods)
    {
        return finishedGoodsMapper.updateFinishedGoods(finishedGoods);
    }

    /**
     * 批量删除成品库存信息
     * 
     * @param inventoryIds 需要删除的成品库存信息主键
     * @return 结果
     */
    @Override
    public int deleteFinishedGoodsByInventoryIds(Long[] inventoryIds)
    {
        return finishedGoodsMapper.deleteFinishedGoodsByInventoryIds(inventoryIds);
    }

    /**
     * 删除成品库存信息信息
     * 
     * @param inventoryId 成品库存信息主键
     * @return 结果
     */
    @Override
    public int deleteFinishedGoodsByInventoryId(Long inventoryId)
    {
        return finishedGoodsMapper.deleteFinishedGoodsByInventoryId(inventoryId);
    }
}
